// 头部导航指令
define('mainNavDirective', ['angular','jquery'], function (angular,$) {
    var m = angular.module('directives');
    m.directive('crmMainNav', [function () {
        return {
            restrict: 'AE',
            templateUrl: 'js/templates/crmMainNav.html',
            replace: true,
            scope:{
                navC:"@",
                pageTitle:"@"
            },
            link: function (scope, elem, attr) {
                $(document).off('click.bs.dropdown.data-api');
                $(elem).find('.navbar-nav>li').on('mouseover',function(){
                    $(this).addClass('open');
                }).on('mouseout',function(){
                    $(this).removeClass('open');
                });
            },
            controller:"mainNavController"
        };
    }]);
});